﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;

namespace WaveMaster.Holidays.Club.Domain
{
    public class Vessel
    {
        public long m_vesselID;
        public string m_vesselCode;
        public string m_vesselName;
        public string m_country;
        public string m_flag;
        public string m_remark;
        public int m_capacity;
        public DateTime m_cretnDate;
        public DateTime m_modfctnDate;
        public long m_cretnBy;
        public long m_modfctnBy;

        public Vessel() { }
        public Vessel(long id) { m_vesselID = id; }
        public Vessel(long id, string name) { m_vesselID = id; m_vesselName = name; }
        public Vessel(MySqlDataReader rd)
        {
            m_vesselID = Convert.ToInt64(rd["m_vesselID"]);
            m_vesselCode = rd["m_vesselCode"].ToString();
            m_vesselName = rd["m_vesselName"].ToString();
            m_country = rd["m_country"].ToString();
            m_flag = rd["m_flag"].ToString();
            m_remark = rd["m_remark"].ToString();
            m_capacity = Convert.ToInt16(rd["m_capacity"]);
            m_cretnDate = Convert.ToDateTime(rd["m_cretnDate"]);
            m_cretnBy = Convert.ToInt64(rd["m_cretnBy"]);
            m_modfctnDate = Convert.ToDateTime(rd["m_modfctnDate"]);
            m_modfctnBy = Convert.ToInt64(rd["m_modfctnBy"]);
        }
        public override string ToString()
        {
            return m_vesselName;
        }

    }
}
